package com.link.order.controller;


import com.link.base.response.Response;
import com.link.order.model.OrderDTO;
import com.link.order.service.domain.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ttao
 * @since 2024/9/28 23:35
 */
@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @PostMapping("/order/add")
    public Response<Void> save(@Validated @RequestBody OrderDTO orderDTO) {
        orderService.creat(orderDTO);
        return Response.of();
    }
}
